<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>财务管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$('#my').click(function(){
				if(confirm('你确定？')){
					alert(1)
				}
			})
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
		
		
		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="javascript:">财务管理列表</a></li>
	</ul>
	 <form:form id="searchForm" modelAttribute="TFinance" action="${ctx}/finance/tFinance/list" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<div class="control-group">
			<label class="control-label">订单号：</label>
			<form:input path="orderid" htmlEscape="false" maxlength="50"
				class="input-small" />
			<label class="control-label">线路名称：</label>
			<form:input path="ordername" htmlEscape="false" maxlength="50"
				class="input-small" />
			<label class="control-label">用车单位：</label>
			<form:input path="clientname" htmlEscape="false" maxlength="50"
				class="input-small" />
			<label class="control-label">司机：</label>
			<form:input path="drvname" htmlEscape="false" maxlength="50"
				class="input-small" />
			<label class="control-label">车牌号：</label>
			<form:input path="licno" htmlEscape="false" maxlength="50"
				class="input-small" />
			<label class="control-label">是否结清：</label>
			<form:select path="settlement" htmlEscape="false" maxlength="50"	class="input-small" >
				<option value="">--请选择--</option>
				<option value="1">是</option>
				<option value="0">否</option>
			</form:select>
		<input class="btn btn-primary" type="submit" value="查询" />
		</div>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>订单号</th>
				<th>线路名称</th>
				<th>司机</th>
				<th>用车单位</th>
				<th>车牌号</th>
				<th>订单金额</th>
				<th>扣款金额</th>
				<th>扣款事由</th>
				<th>实收金额</th>
				<th>现收金额</th>
				<th>实收金额</th>
				<th>定金金额</th>
				<th>实收金额</th>
				<th>挂账金额</th>
				<th>实收金额</th>
				<th>是否结清</th>
				<th>备注</th>
				<th>操作</th>
			</tr>
		</thead>
		<c:forEach items="${page.list}" var="Finance">
			<tr>
				<td>${Finance.orderid}</td>
				<td>${Finance.ordername}<c:if test="${Finance.istrouble == '1' }"><font title="${Finance.reason }"><img src="${ctxStatic }/xiake/images/warn.png"/></font></c:if></td>
				<td>${Finance.drvname}</td>
				<td>${Finance.clientname}</td>
				<td>${Finance.licno}</td>
				<td>￥<fmt:formatNumber type="number" value="${Finance.dueamount}" maxFractionDigits="0"/></td>
				<td>￥<fmt:formatNumber type="number" value="${Finance.deductions}" maxFractionDigits="0"/></td>
				<td>${Finance.dedreason}</td>
				<td>￥<fmt:formatNumber type="number" value="${Finance.dueamount-Finance.deductions}" maxFractionDigits="0"/></td>
				<td>
					<c:if test="${Finance.ordertype!='7'}">￥<fmt:formatNumber type="number" value="${Finance.dueamount}" maxFractionDigits="0"/></c:if>
					<c:if test="${Finance.ordertype=='7'}">￥<fmt:formatNumber type="number" value="${Finance.nowpay}" maxFractionDigits="0"/></c:if>
				</td>
				<td>￥<fmt:formatNumber type="number" value="${Finance.nowpayget}" maxFractionDigits="0"/></td>
				<td>￥<fmt:formatNumber type="number" value="${Finance.downpay}" maxFractionDigits="0"/></td>
				<td>￥<fmt:formatNumber type="number" value="${Finance.downpayget}" maxFractionDigits="0"/></td>
				<td>￥<fmt:formatNumber type="number" value="${Finance.ownpay}" maxFractionDigits="0"/></td>
				<td>￥<fmt:formatNumber type="number" value="${Finance.ownpayget}" maxFractionDigits="0"/></td>
				<td>
					<%-- <c:if test="${Finance.ordertype!='7'}">是</c:if>
					<c:if test="${Finance.ordertype=='7'}">
					<c:if test="${Finance.nowpayget+Finance.downpayget+Finance.ownpayget != Finance.dueamount}">否</c:if>
					<c:if test="${Finance.nowpayget+Finance.downpayget+Finance.ownpayget == Finance.dueamount}">是</c:if>
					</c:if> --%>
					<c:if test="${Finance.settlement eq '1'}">是</c:if>
					<c:if test="${Finance.settlement eq '0'}">否</c:if>
				</td>
				<td>${Finance.financeremark}</td>
				<td>
				    <span ><a  href="${ctx}/finance/tFinance/form?orderid=${Finance.orderid}">编辑</a></span>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>